home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / gsfont.h < prev    next >
C/C++ Source or Header  |  1993-05-27  |  3KB  |  64 lines

  1. /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.  */
  18.  
  19. /* gsfont.h */
  20. /* Font operations for Ghostscript library */
  21. /* Requires gsmatrix.h */
  22.  
  23. /* A 'font directory' object (to avoid making fonts global). */
  24. /* 'directory' is something of a misnomer: this structure */
  25. /* just keeps track of the defined fonts, and the scaled font and */
  26. /* rendered character caches. */
  27. #ifndef gs_font_dir_DEFINED
  28. #  define gs_font_dir_DEFINED    
  29. typedef struct gs_font_dir_s gs_font_dir;
  30. #endif
  31.  
  32. /* Font objects */
  33. struct gs_font_s;
  34. typedef struct gs_font_s gs_font;
  35.  
  36. /* Initialization */
  37. /* These procedures return 0 if they fail. */
  38. gs_font_dir    *gs_font_dir_alloc(P1(const gs_memory_procs *));
  39. gs_font_dir    *gs_font_dir_alloc_limits(P6(const gs_memory_procs *,
  40.             uint /*smax*/, uint /*bmax*/, uint /*mmax*/,
  41.             uint /*cmax*/, uint /*upper*/));
  42.  
  43. /* Font manipulations */
  44. /* Use gs_definefont only with original (unscaled) fonts! */
  45. int gs_definefont(P2(gs_font_dir *, gs_font *));
  46. /* gs_scalefont and gs_makefont return 0 if the scaled font */
  47. /* was already in the cache, 1 if a new font was created. */
  48. /* The second gs_font ** argument returns a font discarded */
  49. /* from the cache (or 0) in the latter case.  This is for */
  50. /* the benefit of reference-counted clients. */
  51. int    gs_scalefont(P5(gs_font_dir *, const gs_font *, floatp, gs_font **, gs_font **));
  52. int    gs_makefont(P5(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **, gs_font **));
  53. int    gs_setfont(P2(gs_state *, gs_font *));
  54. gs_font *    gs_currentfont(P1(const gs_state *));
  55. void    gs_purge_font(P1(const gs_font *));
  56.  
  57. /* Font cache parameter operations */
  58. void    gs_cachestatus(P2(const gs_font_dir *, uint [7]));
  59. int    gs_setcachelimit(P2(gs_font_dir *, uint));
  60. uint    gs_currentcachelower(P1(const gs_font_dir *));
  61. int    gs_setcachelower(P2(gs_font_dir *, uint));
  62. uint    gs_currentcacheupper(P1(const gs_font_dir *));
  63. int    gs_setcacheupper(P2(gs_font_dir *, uint));
  64.